package com.gowow.gowoworionapp.utils

import android.os.Handler
import android.os.Looper
import android.widget.Toast
import com.gowow.gowoworionapp.app.GowowOrionApplication

class ToastUtils {
    fun showShort(text: String?) {
        HANDLER.post {
            Toast.makeText(GowowOrionApplication.context, text, Toast.LENGTH_SHORT).show()
        }

    }

    fun showLong(text: String?) {
        Toast.makeText(GowowOrionApplication.context, text, Toast.LENGTH_SHORT).show()
    }

    private object InnerClass {
        val instance = ToastUtils()
    }

    companion object {
        private val HANDLER = Handler(Looper.getMainLooper())
        val instance: ToastUtils
            get() = InnerClass.instance
    }
}

